package com.heima.article.controller.v1;

import com.heima.article.service.ApAuthorService;
import com.heima.model.common.dtos.ResponseResult;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/article")
public class ApAuthorController {
    @Autowired
    private ApAuthorService authorService;
    @PostMapping("/addAuthor")
    ResponseResult addAuthor(@RequestParam String name, @RequestParam Integer userId){
        return authorService.addAuthor(name,userId);
    }
}
